from selenium import webdriver
from time import sleep
from options import options
import os

def insert_img(driver, name):
    dir_name = os.path.dirname(__file__)
    up_dir_name = os.path.dirname(dir_name)
    img_name = rf'{up_dir_name}\reports\screenshots\{name}.png'
    driver.get_screenshot_as_file(img_name)


if __name__ == '__main__':
    url = r'http://172.16.22.108:1080/webtours/'
    driver = webdriver.Chrome(options=options)
    driver.get(url)

    insert_img(driver)

    driver.quit()
